﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Dracham.Classes
{
    public class Event
    {
        public List<Action> Actions { get; set; }

        public Event()
        {
            this.Actions = new List<Action>();
        }

        public T GetAction<T>(Type type)
        {
            object action = this.Actions.Where(a => a.GetType() == type).SingleOrDefault();
            if (action != null) return (T)action;

            return default(T);
        }
    }
}
